package com.ldp.designpatterns.review.create.factory.abstractfactory;

import com.ldp.designpatterns.review.create.factory.abstractfactory.factory.ColaFactory;
import com.ldp.designpatterns.review.create.factory.abstractfactory.factory.SodaFactory;
import com.ldp.designpatterns.review.create.factory.abstractfactory.service.ColaDrink;
import com.ldp.designpatterns.review.create.factory.abstractfactory.service.Drink;
import com.ldp.designpatterns.review.create.factory.abstractfactory.service.Pizza;

/**
 * @ClassName AbstractFactoryTest
 * @Description TODO
 * @Author lindipei
 * @Date 2023/10/20 11:31
 */
public class AbstractFactoryTest {

    public static void main(String[] args) {
        //套餐1：可乐+胡椒
        System.out.println("---------可乐+胡椒---------");
        Drink colaDrink = new ColaFactory().createDrink();
        colaDrink.getDrink();

        Pizza pepperPizza = new ColaFactory().createPizza();
        pepperPizza.getPizza();
        System.out.println("---------汽水+奶酪---------");
        //套餐2：汽水+奶酪
        Drink sodaDrink = new SodaFactory().createDrink();
        colaDrink.getDrink();

        Pizza chessPizza = new SodaFactory().createPizza();
        chessPizza.getPizza();
    }
}
